package com.mmp.main.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the hospital_device_transferring_info database
 * table.
 *
 */

@Entity
@Table(name = "hospital_device_transferring_info")
public class HospitalDeviceTransferringInfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	@OneToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "device_id")
	private HospitalDevice hospitalDevice;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "transfer_date")
	private Date transferDate;

	@Column(name = "transfer_reason")
	private String transferReason;

	@Column(name = "transfer_report_url")
	private String transferReportUrl;

	@Column(name = "transfer_destination")
	private String transferDestination;

	@ManyToOne
	@JoinColumn(name = "created_by")
	private User createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_in")
	private Date createdIn;

	public HospitalDeviceTransferringInfo() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public HospitalDevice getHospitalDevice() {
		return hospitalDevice;
	}

	public void setHospitalDevice(HospitalDevice hospitalDevice) {
		this.hospitalDevice = hospitalDevice;
	}

	public Date getTransferDate() {
		return transferDate;
	}

	public void setTransferDate(Date transferDate) {
		this.transferDate = transferDate;
	}

	public String getTransferReason() {
		return transferReason;
	}

	public void setTransferReason(String transferReason) {
		this.transferReason = transferReason;
	}

	public String getTransferReportUrl() {
		return transferReportUrl;
	}

	public void setTransferReportUrl(String transferReportUrl) {
		this.transferReportUrl = transferReportUrl;
	}

	public String getTransferDestination() {
		return transferDestination;
	}

	public void setTransferDestination(String transferDestination) {
		this.transferDestination = transferDestination;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedIn() {
		return createdIn;
	}

	public void setCreatedIn(Date createdIn) {
		this.createdIn = createdIn;
	}

}
